package com.example.login;

public class Util {
    /**
     * 检测手机号码
     */
    public static boolean checkPhoneNum(CharSequence c) {
        String str = c instanceof String ? (String) c : c.toString();
        return str.matches("\\d{11}");
    }

    /**
     * 检测验证码
     */
    public static boolean checkVerCode(CharSequence c) {
        String str = c instanceof String ? (String) c : c.toString();
        return str.matches("\\d{6}");
    }
}
